﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site1.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">

    <body onload='init();' onunload="GUnload()" onkeydown="return keyDown(event);" onkeyup="return keyUp(event);">
  <div id='map3d_container' style="width: 500px; height: 380px; margin:0 auto;">
    <div id='map3d' style='height: 100%;'></div>
  </div>
 
  <div style="width: 500px; margin:0 auto;">
    <input style="margin:2px 5px;padding:0;float:left;" type="button" value="Default Location" onclick="truck.teleportTo(37.423501,-122.086744,90);" />
	<form id='searchform' style="margin:2px 5px;padding:0;" action='javascript:submitLocation();void(0);'><p style="margin:0;padding:0;">
	  <input type="text" size="25" id='address' value='(enter a new location)' />
	  <input type="submit" value='Teleport!' /></p>
	</form>
    <form id="options" style="margin:0;padding:0;"  action='javascript:updateOptions();'><p style="margin:0 10px;padding:0;">
      <input type="checkbox" onclick='updateOptions()' name="nav" />Compass |
      <input type="checkbox" onclick='updateOptions()' name="statusbar" />Status Bar</p>
    </form>
    <p>
     <font style='font-size:0.9em;color:#0f0f0f;'><strong>Mini Flight Simulator</strong><br />Use Left and Right Arrows to control plane (with focus on page).<br />More <a href="http://www.barnabu.co.uk/ge-plugin">Google Earth Plugin</a> stuff</font>
</p>
<div style='height:80;padding:10px;'>
<script type="text/javascript"><!--
    google_ad_client = "pub-2851455570271309";
    /* 468x60, created 11/27/09 */
    google_ad_slot = "6774242430";
    google_ad_width = 468;
    google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script></div>
 
<script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
    try {
        var pageTracker = _gat._getTracker("UA-2042313-1");
        pageTracker._trackPageview();
    } catch (err) { }</script>
  </div>
</body>


</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContentPlaceHolder" runat="server">


 <title>Avion Startel 3D</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="description" content="Fly anywhere in the world inside your browser. Uses the Google Earth Plugin." />
  <meta name="author" content="James Stafford" />
  <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAABjx0oPYUSjJcMtziFJBh3BRSawe0pkAO1-1CJ_546RgjHJXXrBT5mlE2-1rbPERKa7Stscmn9QqDkA"></script>
  <script type="text/javascript" src="<%= ResolveUrl("~") %>Scripts/math3d.js"></script>
  <script type="text/javascript" src="<%= ResolveUrl("~") %>Scripts/plane.js"></script>
  
  <script type="text/javascript">
  //<![CDATA[
      google.load("earth", "1", { 'other_params': 'sensor=false' });
      google.load('maps', '2.x', { 'other_params': 'sensor=false' });

      var ge = null;
      var geocoder;
      var truck;

      function el(e) { return document.getElementById(e); }

      function Sample(description, url) {
          this.description = description;
          this.url = url;
          return this;
      }

      var samples = [];

      function init() {
          geocoder = new GClientGeocoder();
          init3D();
      }

      function initCallback(object) {
          ge = object;
          ge.getWindow().setVisibility(true);
           ge.getOptions().setMouseNavigationEnabled(false);
          ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS, true);
          ge.getOptions().setFlyToSpeed(ge.SPEED_TELEPORT);

          truck = new Truck();
      }

      function failureCallback(err) {
      }

      function init3D() {
          google.earth.createInstance("map3d", initCallback, failureCallback);
      }

      function submitLocation() {
          doGeocode(el('address').value);
      }

      function doGeocode(address) {
          geocoder.getLatLng(address, function (point) {
              if (point) {
                  if (ge != null && truck != null) {
                      truck.teleportTo(point.y, point.x);
                  }
              }
          });
      }

      function updateOptions() {
          var options = ge.getOptions();
          var form = el('options');

          options.setStatusBarVisibility(form.statusbar.checked);
          if (form.nav.checked) {
              ge.getNavigationControl().setVisibility(ge.VISIBILITY_SHOW);
          } else {
              ge.getNavigationControl().setVisibility(ge.VISIBILITY_HIDE);
          }
      }
  //]]>
  </script>


</asp:Content>

